package com.xbongbong.pro.enums.menu.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.enums.AccessLinkEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/1/15 14:34
 * @desrcption 工单中心
 * @since v1.0
 */
@Getter
public enum WorkOrderV2CenterEnum {


    // 工单设置
    WORK_ORDER_V2_SETTING(XbbRefTypeEnum.WORK_ORDER_V2_SETTING.getName(), XbbRefTypeEnum.WORK_ORDER_V2_SETTING.getAlias(),
            AccessLinkEnum.WORK_ORDER_V2_SETTING.getIcon(), AccessLinkEnum.WORK_ORDER_V2_SETTING.getUrl(), ProPermissionAliasEnum.WORK_ORDER_V2_TEMPLATE.getAlias()),
    // SLA规则
    WORK_ORDER_V2_SLA_RULE(XbbRefTypeEnum.SLA_RULE.getName(), XbbRefTypeEnum.SLA_RULE.getAlias(),
            AccessLinkEnum.SLA_RULE.getIcon(), AccessLinkEnum.SLA_RULE.getUrl(), ProPermissionAliasEnum.SLA_RULE.getAlias()),
    // 工单池
    WORK_ORDER_V2_POOL(XbbRefTypeEnum.WORK_ORDER_V2_POOL.getName(), XbbRefTypeEnum.WORK_ORDER_V2_POOL.getAlias(),
            AccessLinkEnum.WORK_ORDER_V2_POOL_SETTING.getIcon(), AccessLinkEnum.WORK_ORDER_V2_POOL_SETTING.getUrl(), ProPermissionAliasEnum.WORK_ORDER_V2_POOL.getAlias()),

    ;

    private final String name;

    private final String alias;

    private final String icon;

    private final String url;

    private final String permission;

    WorkOrderV2CenterEnum(String name, String alias, String icon, String url, String permission){
        this.name = name;
        this.alias = alias;
        this.icon = icon;
        this.url = url;
        this.permission = permission;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
